function readgraph
fid_A=fopen('list.txt','rt');
innerfile_A=textscan(fid_A,'%s');
fclose(fid_A);
B=innerfile_A;
C=B{1,1};
C=char(C);
num_sample = size(C,1);

for i = 1 : num_sample
    I = imread(C(i , :));
    I = imresize(I, 0.35);
    I = double(I);
    K = I;
    row = size(I,1);
    column = size(I,2);    
    for j = 2: column
        K(1,j) = K(1,j-1)+ I(1,j);
    end
    for j = 2:row
        K(j,1) = K(j-1,1)+I(j,1);
    end
    for j = 2:column
        for k = 2:row
            K(k,j) = K(k-1,j)+K(k,j-1)-K(k-1,j-1)+I(k,j);
        end
    end
    CC = ([C(i , :) '.mat']);
    DD = ([C(i, 18:size(C,2)) '.bin']);
    fid_B = fopen(DD, 'wb');
    %fwrite(fid_B, K, 'integer*4'); %generate integral graph bin
    fwrite(fid_B, I, 'integer*4'); %generate original graph bin
    fclose (fid_B);
    %save(CC,'K');     %generate integral graph mat

end

